package com.example.springboot_05_mybatis.Dao;


import com.example.springboot_05_mybatis.domain.Article;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface Doman {
    @Select("select * from t_article where id=#{id}")
    public Article getById(Integer id);
    @Insert("insert into t_article (id,title,content) values (#{id},#{title},#{content})")
    public int insert(Article article);
    @Delete("delete from t_article where id=#{id}")
    public Article delById(Integer id);




}
